function getType(extname){
    let type = "";
    switch (extname) {
        case '.html':
            type = 'text/html'
            break;
        case '.css':
            type = 'text/css'
            break;
        case '.js':
            type = 'application/javascript'
            break;
        case '.jpg':
            type = 'image/jpeg'
            break;
        case '.png':
            type = 'image/x-png'
            break;
        case '.webp':
            type = 'image/webp'
            break;
        case '.gif':
            type = 'image/gif'
            break;
        case '.mp4':
            type = 'video/mp4'
            break;
        case '.svg':
            type = 'image/svg+xml'
            break;
        case '.ico':
            type = 'image/x-icon'
            break;    
        default:
            type = 'text/plain'
            break;
    }
    return type;
}
module.exports = getType;